package com.pureut.system.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.system.service.MaterialBomDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/***
 * bom明细控制层
 * Author:C
 * Date:2023/01/09 17:13
 * @DESC
 */
@RestController
@RequestMapping("/material-bom-detail")
public class MaterialBomDetailController extends BaseController {

    @Resource
    MaterialBomDetailService materialBomDetailService;

    /**
     * 根据bomid获取明细信息
     */
    @GetMapping("/getDosage")
    public AjaxResult getDosageByMaterialId(Long bomId,int bomDetailType) {
        return AjaxResult.success(materialBomDetailService.getDosageByMaterialId(bomId,bomDetailType));
    }
}
